Space Ninja
Fruit Ninja meets Gesture Recognition
A short video game created using Python and the Pygame, OpenCV, and MediaPipe libraries.
Space Ninja was created with the intent on increasing the creator's knowledge of Python. It was also an exploration on the usage of gesture recognition through Python.
The inspiration for this game was taken largely from the hit mobile app, Fruit Ninja. The goal was to take the basic concept of Fruit Ninja and be able to control the slicing object based on movements of your hand in relation to the computer's camera.
The code consists of taking the information from the computer camera and identifying if a hand is visible. If there is a visible hand, an image of a knife is displayed on screen at the point of the user's index finger. Once in the main play screen, planets fly onto the screen from both left and right sides. If they come into contact with the knife on screen, they are removed from the screen and a new planet is spawned. When three planets have fallen below the bottom of the screen, the game is over and the option to play again or go to the main menu is given.
The selection of knife assets used in Space Ninja. Credit to SR Kerala on itch.io for these amazing assets.
The selection of slice-able planets in Space Ninja. Credit to Helianthus Games for these wonderfully detailed assets.
Space Ninja
Published:

Owner

Space Ninja

Published:

Tools

Creative Fields